//
//  HLBaseCollectionCtl.h
//  s.
//
//  Created by fanshijian on 2022/8/24.
//  Copyright © 2022 J. All rights reserved.
//

#import "BaseRequestController.h"
#import "MainSectionModel.h"
#import "BECollectionToCollectionModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface BaseCollectionViewController : BaseRequestController
@property (weak, nonatomic) UICollectionView *collectionView;

@property (assign, nonatomic) UIEdgeInsets collectionInsets;
@property (copy, nonatomic, nullable) void (^collectionLayoutBlock)(MASConstraintMaker *make);
@property (copy, nonatomic) JYRStringBlock layoutStringBlock;

@property (strong, nonatomic) NSArray <MainSectionModel *>* __nullable dataSources;

/// 容器视图背景色和header同色
@property (readonly, nonatomic, nullable) NSString *containerColor;
/// 通用section背景色
@property (readonly, nonatomic, nullable) NSString *sectionColor;

/// mj_footer 类，默认
@property (readonly, nonatomic) Class mj_footer_class;
@property (readonly, nonatomic) Class mj_header_class;

/// section header顶部吸顶
@property (readonly, nonatomic) BOOL sectionHeadersPinToVisibleBounds;
/// 是否支持下拉刷新
@property (readonly, nonatomic) BOOL can_pulldown;
/// 是否支持上拉加载
@property (readonly, nonatomic) BOOL can_pullup;

/// 是否显示数据加载全部
@property (readonly, nonatomic) BOOL show_allData;

@property (assign, nonatomic) BOOL showAllDataTip;
@property (assign, nonatomic) NSInteger total;

@property (readonly, nonatomic) UICollectionView *collectV;
- (void)reloadIfNeeded;
- (void)_endRefresh;
@end

NS_ASSUME_NONNULL_END
